#pragma once

#include "ClassInfo.h"

#include <map>
#include <string>

namespace JCC
{
	namespace TOOL
	{
		class CJCCGetMemHeadAddrTool
		{
		public:
			CJCCGetMemHeadAddrTool(void);
			~CJCCGetMemHeadAddrTool(void);

			CJCCGetMemHeadAddrTool(const CJCCGetMemHeadAddrTool& val);

			CJCCGetMemHeadAddrTool& operator=(const CJCCGetMemHeadAddrTool& val);

			std::map<unsigned long, CClassMemberInfo>* MemHeadAddr() const { return _mem_head_addr; }
			void MemHeadAddr(std::map<unsigned long, CClassMemberInfo>* val) { _mem_head_addr = val; }

			bool AssignMemsByJson(unsigned long jcc_start_addr, CClassInfo* class_info_, std::string json_);

			std::string GainJsonByMems(unsigned long jcc_start_addr, CClassInfo* class_info_);

		private:
			bool Initialize(unsigned long jcc_start_addr, CClassInfo* class_info_);

		private:
			unsigned long _jcc_start_addr;

			std::map<unsigned long, CClassMemberInfo>* _mem_head_addr;

		};
	}
}

